Since a storage system may have bad bytes in the data area and spare area at the time of shipment, these bad bytes must be replaced by good bytes These bad bytes would be denoted as “Bad Columns”
Please reference to FIG. 1, which illustrates a non-volatile storage system, such as a memory card, solid state disk, pen-drive, and so on, used to store data from hosts
Generally, a non-volatile data storage system 100 comprises a controller 120, a non-volatile storage medium 140 and a random access memory 160. The controller 120 is as an interface located between the host 110 and the storage medium 140. The controller 120 converts a logical address to a physical address according to a logical-to-physical address mapping table (not shown). The non-volatile storage medium 140 is for data storage and may be a hard disk or a flash memory. The random access memory 160 may is a volatile memory, which stores temporary data or information for controller operation.
Please also reference to FIGS. 2 to 4. FIG. 2 is a schematic diagram of the conventional method for replacing bad column. FIG. 3 is a schematic diagram of the conventional method for replacing bad column in data stream. FIG. 4 is a mapping table used for the method in FIG. 2.
In FIG. 2, B1, B2 . . . Bn are referred to bad columns, which may be replaced by good spare columns S1, S2 . . . Sn, respectively. The mapping table is shown in FIG. 4.
In FIG. 3, Bad column Bn is used when accessing data, then the controller 120 (shown in FIG. 1) has to switch the column address of the bad column B1 to the spare column S1 and perform access, and then switch back to the column address of the column C1 next to the bad column B1 to continue original access. If the spare column S1 is just also a bad column, more complex operations may be involved. For a storage system with n bad columns, a table with 2n entries is required for bad column mapping (shown in FIG. 4).
Please reference to FIG. 5, which is a flow chart of the conventional method for replacing the address of some bad bytes (bad columns) of the data area and the spare area to the good address of bytes (good columns).
The conventional method for replacing the address of some bad bytes (bad columns) of the data area and the spare area to the good address of bytes (good columns) comprises the steps as following:                step SA1: waiting for a command from the host (110 shown in FIG. 1);        step SA2: judging if there is still some data to be processed; if no, go back to the step SA1; if yes, go to next step;        step SA3: judging if a bad column is used; if no, process data access and go back to the step SA2 (step SA8);        step SA4: if yes, find out corresponding address of the replaced column according to a mapping table;        step SA5: switch the address to the replaced column;        step SA6: processing data accessing; and        step SA7: switch the address to the column just behind the original bad column and go back to the step SA2.        
The conventional bad column replacement methodology has following disadvantages.
1. Need larger table for bad column mapping.
2. Data access is not continuous and then results in complex operations and with high cost of software and hardware.
3. Data access is not continuous and then results in performance degrade.
That is, the conventional bad column replacement methodology is poor performance, complex operation, and with high cost of software and hardware.